#!/bin/bash

$ENV="dev"

if  [[  $ENV ==   "dev" ]] ;  then
    source ../config/dev.conf
else
    source ../config/prod.conf
fi




echo "user=$user"
echo "password=$password"
echo "database=$database"
echo "host=$host"
echo "port=$port"






#img data file
loadDataFile=./data.txt

#将采集信息插入到数据库中
loadCommand="load data local infile '$loadDataFile' into table oa_dev.t_vsp_pos_trans_img fields terminated BY ' ' lines terminated BY '\n' (trans_date,merchant_no,trans_flow_no,eticket_file);"
mysql --local-infile=1 -u$user -p$password -h $host  -P $port oa_dev -e "$loadCommand"
echo "job  done !  execute result is ==>  $0 "
exit 0








